<?php
/**
 * Created by PhpStorm.
 * User: jz
 * Date: 16/7/7
 * Time: 下午1:57
 */

function filled_out($form_vars)
{
    foreach ($form_vars as $key => $val){
        if (!isset($key) || $val == ''){
            return false;
        }
    }
    return true;
}

function is_email($email)
{
    if (mb_ereg('^[0-9a-zA-Z_\.\-]+@[0-9a-zA-Z\-]+\.[0-9a-zA-Z\-\.]+$', $email)){
        return true;
    }
    return false;
}